<include file="public@header"/>
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">

			<li><if condition="$incubator_type eq 1"><a href="{:url('station/index')}">园区</a><else /><a href="{:url('station/roomIndex')}">众创</a></if></li>
			<li><a href='{:url('station/addStation',array('cate'=>$incubator_type))}'>添加</a></li>
			<li class="active"><a href="javascript:;">详情</a></li>
		</ul>

		<form method="post" class="form-horizontal js-ajax-forms margin-top-20" action="{'Station/editStation'}">

			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label room_name"><if condition="$detail.type eq 2">工位<else/>房间名</if><span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input readonly="readonly" class="form-control" type="text" name="station_name" value="{$detail.station_name}" required="true">
				</div>
			</div>
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">状态</label>
				<div class="col-md-6 col-sm-10">
					<select readonly="readonly" class="form-control" name="status" id="parent_id">
						<option value="">==请选择==</option>
						<option value="2"<if condition="$detail.is_use eq 2">selected</if>>禁用</option>
						<option value="1"<if condition="$detail.is_use eq 1">selected</if>>可用</option>
						
					</select>
				</div>
			</div>
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">所属孵化器</label>
				<div class="col-md-6 col-sm-10">
					<select readonly="readonly" class="form-control" name="incubator_id" id="parent_id">
						<option value="">==请选择==</option>
						<volist name="incubator_list" id="vo">
						<option value="{$vo.id}" <if condition="$detail.incubator_id eq $vo.id">selected</if>>{$vo.incubator_name}</option>
						</volist>
						
						
					</select>
				</div>
			</div>
			<div class="form-group" style="display:none" id="space_type">
				<label for="input-name" class="col-sm-2 control-label">空间类型</label>
				<div class="col-md-6 col-sm-10">
					<select readonly="readonly" class="form-control room_type" name="type" id="parent_id">
						<option value="">==请选择==</option>
						<option value="1" <if condition="$detail.type eq 1">selected</if>>房间</option>
						<option value="2" <if condition="$detail.type eq 2">selected</if>>工位</option>
						
					</select>
				</div>
				</div>
			<div class="form-group  hide_area">
				<label for="input-name" class="col-sm-2 control-label">面积<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input readonly="readonly" class="form-control" type="text" name="covered_area" value="{$detail.covered_area}" >
				</div>
			</div>
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">编号<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" type="text" name="space_num" value="{$detail.space_num}" required="true" readonly="readonly">
				</div>
			</div>
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">单价<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10 price">
					<input readonly="readonly" class="form-control" type="text" name="price" value="{$detail.price}" required="true">
				</div><label for="input-name" class="col-sm-1 control-label unit">元/㎡/天</label>
			</div>
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">电话<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input readonly="readonly" class="form-control" type="text" name="tel" value="{$detail.tel}" required="true">
				</div>
			</div>
			<!-- <div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">图片<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input readonly="readonly" class="form-control" type="text" name="pic" value="{$detail.pic}" required="true">
				</div>
			</div> -->
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">图片</label>
				<div class="col-md-6 col-sm-10">
					<imagetpl name="pic" id="img" value="$detail['pic']"/>
				</div>
			</div>
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">简介<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input readonly="readonly" class="form-control" type="text" name="station_desc" value="{$detail.station_desc}" required="true">
				</div>
			</div>
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">地址<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input readonly="readonly" class="form-control" type="text" name="address" value="{$detail.address}"  readonly="readonly" required="true">
				</div>
			</div>

		</div>
			<!-- <div class="form-group">
				<label for="input-remark" class="col-sm-2 control-label">备注</label>
				<div class="col-md-6 col-sm-10">
					<label class="radio-inline js-icheck"><input readonly="readonly" type="radio" name="status" value="1" checked>显示</label>
					<label class="radio-inline js-icheck"><input readonly="readonly" type="radio" name="status" value="0" <if condition="1">checked</if>>隐藏</label>
				</div>
			</div> -->
		<!-- 	<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
					<a class="btn btn-default" href="{:url('index',['type_id'=>1])}">{:lang('BACK')}</a>
				</div>
			</div> -->
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
		$(function() {
			type=<?php echo $incubator_type; ?>;
			//alert(type);
			if(type==2){
				$(".unit").text('元/月');
				$("#space_type").css('display','block');
				//$(".room_name").html('房间名<span class="form-required">*</span>');
			}
			   type=$(".room_type").val();
			    if(type==2){
					$("input[name=covered_area]").val(0);
					$(".hide_area").css('display','none');
				}else{
					$(".hide_area").css('display','');
					$("input[name=covered_area]").attr('required','true');
				}
			$(".room_type").change(function(){
				type=$(this).val();
				if(type==2){
					$(".unit").text('元/月');
					$(".room_name").html('工位名<span class="form-required">*</span>');
					$("input[name=covered_area]").val(0);
					$(".hide_area").css('display','none');
				}else{
					$(".unit").text('元/㎡/天');
					$(".room_name").html('房间名<span class="form-required">*</span>');
					$(".hide_area").css('display','');
					$("input[name=covered_area]").attr('required','true');
				}
				
			})	
		});
	</script>
</body>
</html>